/*
*
* FileMapper.java
* @date 2019-02-14
*/
package com.lyz.myself.mapper;

import com.lyz.myself.pojo.Po.FileLeads;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface FileMapper {
    /**
     *删除附件（可批量）
     * @mbg.generated 2019-02-14
     */
    int deleteFile(@Param("list") List<Integer> list);

    /**
     *添加附件
     * @mbg.generated 2019-02-14
     */
    int insert(List<FileLeads> list);

    /**
     *
     * @mbg.generated 2019-02-14
     */
    int insertSelective(FileLeads record);

    /**
     *
     * @mbg.generated 2019-02-14
     */
    FileLeads selectByPrimaryKey(Integer file_id);

    /**
     *根据线索id查询附件
     * @mbg.generated 2019-02-14
     */
    List<Map<String,String>> selectByleadsId(@Param("leads_id")Integer leads_id, @Param("company_id") Integer company_id);

    /**
     *
     * @mbg.generated 2019-02-14
     */
    int updateByPrimaryKeySelective(FileLeads record);

    /**
     *
     * @mbg.generated 2019-02-14
     */
    int updateByPrimaryKey(FileLeads record);

    /**
     *根据id批量修改线索附件
     */
    int updateFiled(Map<String,Object> map);

    /**
     *根据路径查询附件id
     */
    String findFiledId(@Param("filePath") String filePath);

    /**
     * 删除线索附件
     * @param file_path
     * @return
     */
    int deleteLeadsFile(@Param("file_path") String file_path);
}